package com.controller;

import com.po.Manager;
import com.po.User;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Created by 阳幸子 on 2018/3/12.
 */


@Controller
public class Hello {

    @RequestMapping(value="/index")
    public String hello(){
        System.out.println("hello...");
        return "index";
    }
    @RequestMapping(value="/trainers")
    public String trainers(){
        return "trainers";
    }
    @RequestMapping(value="/events")
    public String events(){
        return "events";
    }
    @RequestMapping(value="/login")
    public String login(){
        return "login";
    }
    @RequestMapping(value="/register")
    public String register(){
        return "register";
    }

    @RequestMapping(value="/manager_registerhtml")
    public String manager_registerhtml(Model model){

        model.addAttribute("manager",new Manager());
        return "manager_register";
    }

    @RequestMapping(value="/user_registerhtml")
    public String user_registerhtml(Model model) {
        model.addAttribute("user",new User());
        return "user_register";
    }
    @RequestMapping(value="/helloUp")
    public String hello1(){
        System.out.println("hello...");
        return "/upload/index";
    }

}
